package com.heima;

import java.util.Scanner;

public class TestHomework04_Worker {
    public static void main(String[] args) {
        Homework04_Worker worker = new Homework04_Worker();
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入姓名：");
        String name = sc.next();
        worker.setName(name);
        System.out.println("请输入密码：");
        String password = sc.next();
        worker.setPassword(password);
        if (worker.getName().equals("张三") && worker.getPassword().equals("123")) {
            System.out.println("登录成功");
        } else {
            System.out.println("登录失败");
        }
    }
}
